{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "233b203a-1a75-4e1f-a022-ad3523989552",
   "metadata": {},
   "source": [
    "Chapter 15\n",
    "\n",
    "# 用Networkx绘制无向图\n",
    "《线性代数》 | 鸢尾花书：数学不难"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7c0aa49d-7fbc-47e4-a4a9-c1abe77fed6f",
   "metadata": {},
   "source": [
    "这段代码从数学角度出发，展示了如何使用 NetworkX 构建一个简单的**无向图**，并以平面图的形式将其可视化。整个过程包含图的定义、节点与边的添加、坐标设定与图形绘制几个核心步骤，每一步都可以在图论中找到相应的数学意义。\n",
    "\n",
    "---\n",
    "\n",
    "$第一步$，定义一个无向图对象 `undirected_G = nx.Graph()`，这在数学上表示我们将构建一个无向图 $G = (V, E)$，其中 $V$ 是节点集合，$E$ 是边集合。无向图的特点是边 $(u, v) \\in E$ 不区分顺序，即 $(u,v)$ 与 $(v,u)$ 等价。\n",
    "\n",
    "$第二步$，添加节点集合：\n",
    "$$\n",
    "V = \\{a, b, c, d\\}\n",
    "$$\n",
    "每个节点是图的一个顶点，在这个例子中以字符串形式表示。图的节点可以是任意可哈希对象，数学上通常用集合来描述。\n",
    "\n",
    "$第三步$，添加边集合：\n",
    "$$\n",
    "E = \\{(a,b), (a,c), (a,d), (b,c), (c,d)\\}\n",
    "$$\n",
    "每条边连接两个节点，表示这两个节点之间存在一种关系或路径。由于这是一个无向图，上述边都是无向边。\n",
    "\n",
    "$第四步$，通过字典 `pos` 明确每个节点在二维空间中的位置坐标：\n",
    "$$\n",
    "\\text{pos}(a) = (0,0),\\quad \\text{pos}(b) = (1,0),\\quad \\text{pos}(c) = (1,1),\\quad \\text{pos}(d) = (0,1)\n",
    "$$\n",
    "从几何角度看，这相当于将图嵌入到二维平面中，使其成为一个几何图形 $G = (V, E, \\text{pos})$，其中 $\\text{pos}: V \\rightarrow \\mathbb{R}^2$ 是一个从节点映射到平面坐标的函数。\n",
    "\n",
    "$第五步$，使用 `nx.draw_networkx()` 函数结合 Matplotlib 进行可视化。这一步从图形角度将无向图描绘出来，其中：\n",
    "- 节点的位置由 `pos` 决定；\n",
    "- 每条边绘制为连接相应两个节点的线段；\n",
    "- `node_size=188` 指定节点的大小，增强图形辨识度；\n",
    "- 图像大小设为 $6 \\times 6$ 英寸，是为了使图形更均衡居中。\n",
    "\n",
    "---\n",
    "\n",
    "综合来看，这段代码从集合和几何视角构建了一个简单的无向图：\n",
    "- 节点集合 $V$ 有 4 个元素；\n",
    "- 边集合 $E$ 有 5 条边；\n",
    "- 坐标集合 $\\text{pos}$ 定义了图在平面中的嵌入方式；\n",
    "- 绘图函数将抽象的图变为直观可视的对象。\n",
    "\n",
    "这样的图可以用于分析节点间的关系结构，如度数、路径长度、是否连通、是否存在三角形结构（如 $a-b-c-a$ 组成的环）等图论概念。"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "19e5bd7e-bd17-482e-be3e-000b596a09d0",
   "metadata": {},
   "source": [
    "## 初始化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "7d7c462a-c294-4f88-a4a7-6be0b6aecf17",
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import networkx as nx"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "633d0f38-8b87-42ca-abc0-e738d80a67cc",
   "metadata": {},
   "source": [
    "## 无向图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "e53aa32b-f827-44a3-bba3-3927279c3615",
   "metadata": {},
   "outputs": [],
   "source": [
    "undirected_G = nx.Graph()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0f0820c2-fda1-4f4b-9cbf-e520ac9fa465",
   "metadata": {},
   "source": [
    "## 添加节点"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "52fd8065-1144-4886-afe3-840e57de0ee0",
   "metadata": {},
   "outputs": [],
   "source": [
    "undirected_G.add_nodes_from(['a','b','c','d'])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "40dbf73b-3af2-49c7-b408-8af5356c342a",
   "metadata": {},
   "source": [
    "## 添加无向边"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "2c8d1948-e2d3-490a-a554-cc50341e47f8",
   "metadata": {},
   "outputs": [],
   "source": [
    "undirected_G.add_edges_from([('a','b'),\n",
    "                             ('a','c'),\n",
    "                             ('a','d'),\n",
    "                             ('b','c'),\n",
    "                             ('c','d')])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "74501c72-2205-46cc-8ddb-8abe91e32e31",
   "metadata": {},
   "source": [
    "## 定义节点坐标"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "a62cc18d-eb71-4490-8dc0-2731ada91042",
   "metadata": {},
   "outputs": [],
   "source": [
    "pos = {'a':[0, 0], \n",
    "       'b':[1, 0],\n",
    "       'c':[1, 1],\n",
    "       'd':[0, 1]}"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9ba47ad7-2bd9-4660-b4af-7d395276aad1",
   "metadata": {},
   "source": [
    "## 可视化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "ced4448e-0ef3-496a-b3d5-9ed907c7c713",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAeQAAAHiCAYAAAA597/kAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA1DUlEQVR4nO3deZzMhePH8ffsrnOxiJwrIiW30vnNzuyFdV+RwkqiFEm3vjnKV/UlIkmRK6TcN3uNFEohcpQKLUuuPbHW7nx+f/Tll1yLnf18Zub1/G93ZufzZvexr53bZhiGIQAAYCo/swcAAACCDACAJRBkAAAsgCADAGABBBkAAAsgyAAAWABBBgDAAggyAAAWEJCbM7lcLiUlJal48eKy2Wzu3gQA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L4WlPbpaYmCi73a6zZ88SYwDAZXnkNeSkpCTFxcUpJiZGX3/9tfbu3StJCg0NVdWqVRUWFqbw8HA1adJEgYGBpu38448/5HA45HK55HQ6VbVqVdO2AACszaOuIR86dEjR0dGqVKmSunfvru3bt6tt27bq06ePJKlbt25q0KCB5s6dq6ioKFWsWFGjRo1SVlZWvm/dv3+/7Ha7DMMgxgCAq/KIIBuGoffee081a9bUsmXLNH78eB05ckRbtmzRe++9pyeffFKS1LNnT02bNk2JiYnatWuXunXrppdffll169bV2rVr823vvn37ZLfbJUlOp1O33HJLvh0bAOCZLB9kwzA0YMAADRo0SD179tSePXv0zDPPqGzZspf9GpvNpjvuuEMffPCBtm7dqnLlyikyMlJLly51+95zMfbz89PatWtVpUoVtx8TAOD5LB1kl8ulvn37avz48froo480btw4lSpV6pouo27duoqNjVXLli3Vvn17zZ8/301rpb1798putysgIEBr165VcHCw244FAPAulg7yBx98oI8//lhTp049fz/x9ShYsKDmzp2rjh07qmvXrtq5c2cervzL77//LrvdrgIFCsjpdKpy5cp5fgwAgPeybJD37NmjV155Rc8++6yio6Nv+PICAgI0depU3XrrrYqOjlZ2dvaNj/yf3377TXa7XYUKFSLGAIDrYskgG4ahnj17qmLFiho5cmSeXW7hwoU1bdo0/fDDDxo9enSeXOa5GBcpUkROp1OVKlXKk8sFAPgWSwY5NjZW33zzjSZOnJjnzyO+99579fTTT+udd97RyZMnb+iyfv31V4WEhCgwMFAJCQmqWLFiHq0EAPgaSwZ5zJgxatCggcLDw91y+c8//7xSU1M1c+bM676MPXv2KCQkRMWLFyfGAIAbZrkg7969WytXrtRzzz0nm83mlmNUq1ZNbdu21dixY+Vyua7563/55RfZ7XYFBQUpISFBFSpUcMNKAIAvsVyQv/zyS5UoUUJdunRx63H69u2rn3/+Wdu3b7+mr/v5559lt9tVsmRJJSQkqHz58m5aCADwJZYLckxMjEJDQ1WoUCG3HqdJkyYqUqSIYmJicv01u3fvlt1uV+nSpRUfH69y5cq5cSEAwJdYKs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CADAGABBBkAAAsgyAAAWEBAbs5kGIYkKS0tza1jAADwNufaea6ll5OrIKenp0uSgoODb3AWAAC+KT09XUFBQZc93WZcLdmSXC6XkpKSVLx4cdlstjwdCACANzMMQ+np6apYsaL8/C5/T3GuggwAANyLB3UBAGABBBkAAAsgyAAAWABBBgDAAggyAAAWQJABALAAggwAgAX8HzGxh9lZFMXNAAAAAElFTkSuQmCC",
      "text/plain": [
       "<Figure size 600x600 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize = (6,6))\n",
    "nx.draw_networkx(undirected_G, pos = pos, node_size = 188)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "32a7f1da-9503-4634-ae7b-ec982967cc9b",
   "metadata": {},
   "source": [
    "## 邻接矩阵"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "52210193-96bb-4b37-b0fa-13c8dd17ecad",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1, 1, 1, 1],\n",
       "       [1, 0, 1, 0],\n",
       "       [1, 1, 0, 1],\n",
       "       [1, 0, 1, 0]])"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A = nx.adjacency_matrix(undirected_G).toarray()\n",
    "A"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "600adb00-0283-45ff-952c-afa16d32b6e0",
   "metadata": {},
   "source": [
    "作者\t**生姜DrGinger**  \n",
    "脚本\t**生姜DrGinger**  \n",
    "视频\t**崔崔CuiCui**  \n",
    "开源资源\t[**GitHub**](https://github.com/Visualize-ML)  \n",
    "平台\t[**油管**](https://www.youtube.com/@DrGinger_Jiang)\t\t\n",
    "\t\t[**iris小课堂**](https://space.bilibili.com/3546865719052873)\t\t\n",
    "\t\t[**生姜DrGinger**](https://space.bilibili.com/513194466)  "
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda env:base] *",
   "language": "python",
   "name": "conda-base-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
